<script setup lang='ts'>
import { ElMessage, ElMessageBox } from 'element-plus'
import type { Action } from 'element-plus'

const open = () => {
    ElMessageBox.alert('This is a message', 'Title', {
        // if you want to disable its autofocus
        // autofocus: false,
        confirmButtonText: 'OK',
        callback: (action: Action) => {
            ElMessage({
                type: 'info',
                message: `action: ${action}`,
            })
        },
    })
}
</script>
<template>
    <div class="container">
        <el-button text @click="open">Click to open the Message Box</el-button>
    </div>
</template>
<style scoped>
</style>
